import java.util.Scanner;

public class Main {
	
	private static int floor(int n) {
		if(n == 0)
			return +1;
		else if(n < 0)
			return +0;
		else
			return floor(n - 1) + floor(n - 2);
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x, i;
		
		while(sc.hasNext()) {
			x = sc.nextInt();
			for(i = 0; i < x; i++) {
				System.out.println(floor(sc.nextInt()));
			}
		}
	}

}